package com.zzh.partnersys.utils;

import java.util.Random;

/**
 * @author zzh
 * @version 1.0
 * 6位随机验证码工具类
 */
public class CodeUtils {
    public static String getCodeToSix(){
        //随机生成6位验证码
        Random random = new Random();
        StringBuilder code = new StringBuilder();
        for (int i = 0; i < 6; i++) {
            code.append(random.nextInt(10));
        }
        return code.toString();
    }
}
